//made by me :D
//radit ~

var app = this;

exports.setup = function(scene_) {
	app.scene = scene_;
};

function animationFade(layer_, imageName_, x_, y_, width_, height_, duration_) {	
	app.scene.defineSpritesheet(app.sprite, app.resourceURL(imageName_), app.width, app.height);
	app.scene.setLayerBackground(app.layer, {
			sprite: app.sprite,
			x: app.x-(app.width*app.kali),
			y: app.y-(app.height*app.kali),
			tile: true,
			width: (app.width*app.kali)+app.maxWidth,
			height: (app.height*app.kali)+app.maxHeight
	});
	
	
}

exports.animationFade = animationFade;

animationFade.prototype = {
	scene: function() {
		return app.scene;
	},
	
	stopAnimation: function(){
		app.play = false;
	},
	
	rand: function(n) {return Math.floor(Math.random() * n);}
};
